package com.itedge.infrastructure.service.domain;

import java.util.List;

/**
 * Interface for Entities, which could be searched based on freely defined criteria.
 * 
 * @author jhe
 *
 * @param <E>
 */
public interface ISearchableEntityService<E> extends IEntityService<E> {
	
	/**
	 * Return entity matching with criteria specified in searchEntity, 
	 * with optional maxResults parameter (ignored if null).
	 * 
	 * @param searchEntity
	 * @param maxResults
	 * @return list with entities corresponding to criteria set in searchEntity parameter, 
	 * with optional maxResults parameter
	 */
	public List<E> findEntitiesByCriteria(E searchEntity, Integer maxResults);

}
